
{% if books %}
<p>請選擇最匹配的記錄複製為本書的描述信息</p>
<style>.refer .comments {height: 100px; overflow: hidden; text-overflow: ellipsis; }</style>
<table class='table refer'>
    {% for book in books %}
    <tr>
        <td style='vertical-align: middle; padding: 8px 0px;'>
            <img style='height: 120px; max-width: 90px;' src="/pcover?url={{book.cover_url|urlencode}}" />
        </td>
        <td style='vertical-align: middle; padding: 8px 0px;'>
            <p>
                <span class="label label-success">{{book.source}}</span>
                <a target='_blank' href="{{book.website}}#">{{book.title}}</a> - {{book.author_sort}}</h4>
            </p>
            <p class='comments' >
            {{book.publisher}} (ISBN:{{book.isbn}}) <br/>
            <small> {% if book.comments %}{{book.comments|striptags}}{%endif%}</small>
            </p>
        </td>

        <td style='vertical-align: middle; padding: 8px 0px;'>
            <form class="form-horizontal" role="form" action="/book/{{book_id}}/refer/set/{{book.isbn}}" method="POST">
                <button type="submit" class="btn btn-sm btn-success">設置</button>
            </form>
        </td>
    </tr>
    {% endfor %}
</table>
{% else %}
<p>暫未搜索到相關條目</p>
{% endif %}
